
package com.aceitunaproject.server.installation;

import java.util.Map;

import com.aceitunaproject.server.ServerConfiguration;



public class InstallationTypeManagerImpl implements InstallationTypeManager {

	private Map<String, InstallationType> allInstallationTypes;
	private InstallationTypeLoader InstallationTypeLoader;
	
	@Override
	public Map<String, InstallationType> getAllInstallationTypes() {
		
		if(allInstallationTypes == null)
		{
			allInstallationTypes = getInstallationTypeLoader().getInstallationTypes();
		}
		return allInstallationTypes;
	}

	@Override
	public InstallationTypeLoader getInstallationTypeLoader() {
		if(InstallationTypeLoader == null)
		{
			InstallationTypeLoader = ServerConfiguration.getInstallationTypeLoader();
		}
		return InstallationTypeLoader;
	}

	@Override
	public void setInstallationTypeLoader(
			InstallationTypeLoader InstallationTypeLoader) {
		this.InstallationTypeLoader = InstallationTypeLoader;
		
	}

}
